import VueRouter from 'vue-router'
// 导入对应的路由组件
import homeContainer from './components/tabbar/HomeContainer.vue'
import memberContainer from './components/tabbar/MemberContainer.vue'
import shopContainer from './components/tabbar/ShopContainer.vue'
import searchContainer from './components/tabbar/SearchContainer.vue'
import newsList from './components/news/NewsList.vue'
import newsInfo from './components/news/NewsInfo.vue'

import photoList from './components/photos/PhotoList.vue'
import photoinfo from './components/photos/photoInfo.vue'

import goodsList from './components/goods/GoodList.vue'
import goodsInfo from './components/goods/GoodInfo.vue'
import goodsDesc from './components/goods/GoodsDesc.vue'
import goodsComment from './components/goods/GoodsComment.vue'

var routes=[
    {path:'/',redirect:'/home'},
    {path:'/home',component:homeContainer},
    {path:'/member',component:memberContainer},
    {path:'/shopcar',component:shopContainer},
    {path:'/search',component:searchContainer},
    {path:'/home/newlist',component:newsList},
    {path:'/home/newsinfo/:id',component:newsInfo},

    {path:'/home/photolist',component:photoList},
    {path:'/home/photoinfo/:id',component:photoinfo},

    {path:'/home/goodslist',component:goodsList} ,///home/goodslist
    // name属性 给路由起个名字
    {path:'/home/goodsinfo/:id',component:goodsInfo,name:'goodsinfo'},
    {path:'/home/goodsdesc/:id',component:goodsDesc,name:'goodsdesc'},
    {path:'/home/goodscomment/:id',component:goodsComment,name:'goodscomment'}

    


]
const router = new VueRouter({
    routes,
    linkActiveClass:'mui-active' //
})

export default router